<?php



class StockdiaryMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.openbravo.map.StockdiaryMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(StockdiaryPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(StockdiaryPeer::TABLE_NAME);
		$tMap->setPhpName('Stockdiary');
		$tMap->setClassname('Stockdiary');

		$tMap->setUseIdGenerator(false);

		$tMap->addPrimaryKey('ID', 'Id', 'VARCHAR', true, 255);

		$tMap->addColumn('DATENEW', 'Datenew', 'TIMESTAMP', true, null);

		$tMap->addColumn('REASON', 'Reason', 'INTEGER', true, 11);

		$tMap->addForeignKey('LOCATION', 'Location', 'VARCHAR', 'LOCATIONS', 'ID', true, 255);

		$tMap->addForeignKey('PRODUCT', 'Product', 'VARCHAR', 'PRODUCTS', 'ID', true, 255);

		$tMap->addColumn('UNITS', 'Units', 'DOUBLE', true, null);

		$tMap->addColumn('PRICE', 'Price', 'DOUBLE', true, null);

	} 
} 